Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Item as kwarg #177

Merged
merged 7 commits into from
Jun 14, 2024
Merged

Item as kwarg #177

merged 7 commits into from
Jun 14, 2024

Conversation

Licini
Copy link
Collaborator

@Licini Licini commented Jun 13, 2024

Accommodating the changes from compas-dev/compas#1353

@Licini Licini requested a review from tomvanmele June 13, 2024 16:41
self.objects = [ViewerSceneObject(item, **kwargs) for item in self.collection.items]
def __init__(self, **kwargs):
super().__init__(**kwargs)
kwargs.pop("item")
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

what does this do?

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This was to remove item from kwargs so in next line item is not given twice which will trigger error.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

just put item as a keyword argument in the first init

src/compas_viewer/scene/groupobject.py Outdated Show resolved Hide resolved
src/compas_viewer/scene/nurbscurveobject.py Outdated Show resolved Hide resolved
src/compas_viewer/scene/polygonobject.py Outdated Show resolved Hide resolved
src/compas_viewer/scene/polyhedronobject.py Outdated Show resolved Hide resolved
@Licini
Copy link
Collaborator Author

Licini commented Jun 14, 2024

@tomvanmele done, take another look?

Copy link
Member

@tomvanmele tomvanmele left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

just a few small things. otherwise LGTM

def __init__(self, graph: Graph, **kwargs):
super(GraphObject, self).__init__(graph=graph, **kwargs)
self.graph: Graph
"""Viewer scene object for displaying COMPAS Graph data."""
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

why not add the type of graph

src/compas_viewer/scene/meshobject.py Show resolved Hide resolved
@Licini Licini merged commit 1432991 into main Jun 14, 2024
11 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants